<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <script src="./lib/jquery.js"></script>
    <script>
        console.log(123); //第一个打印
        //Ajax发出的请求过程是异步的
        //Ajax异步的结果必须利用回调函数获得
        $.get('http://www.liulongbin.top:3006/api/getbooks', function(res) {
            console.log(res); //第三个打印
            console.log(789); //第四个打印
        });
        console.log(456); //第二个打印
    </script>
</body>

</html>